
//void __stdcall _MemSet_WMMX(unsigned char* pDst, unsigned char value, int size);


#include <asm.h>

.global C_SYMBOL(MemSet_WMMX)


C_SYMBOL(MemSet_WMMX):

arg_0 =	0

    STMFD	SP!, {R4-R6,LR}
    TBCSTB  wR0, R1

_lc010_000413_:
    MOV	R5, R2
    ADD	R6, R0,	#7
    BIC	R6, R6,	#7
    SUB	R6, R6,	R0
    CMP	R6, #0
    BEQ	_lc030_000440_

_lc020_000428_:
    CMP	R6, R5
    MOVGT	R6, R5
    SUB	R5, R5,	R6

_lc021_000432_:
    SUBS	R6, R6,	#1
    WSTRB   wR0, [R0], #1
    BGT	_lc021_000432_
    CMP	R5, #0
    BEQ	_lc060_000464_

_lc030_000440_:
    SUBS	R5, R5,	#0x20
    ADDMI	R6, R5,	#0x20
    ADDMI	R5, R5,	#0x20
    BMI	_lc020_000428_

_lc040_000449_:
    WSTRD   wR0, [R0], #8
    WSTRD   wR0, [R0], #8
    SUBS	R5, R5,	#0x20
    WSTRD   wR0, [R0], #8
    WSTRD   wR0, [R0], #8
    BGE	_lc040_000449_
    ADDS	R5, R5,	#0x20
    MOVGT	R6, R5
    BGT	_lc020_000428_

_lc060_000464_:
    LDMFD	SP!, {R4-R6,PC}

